# @Time : 2022/9/2 9:58
# @Author : hr
# @File : exam.py
# @Software: PyCharm
import yaml

def get_add_employee_data(type,level):
    with open('add_employee_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}

def get_depart_data(type,level):
    with open('add_department_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}

def get_depart_to_connect_data(type,level):
    with open('add_connect_to_depart_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}

def get_del_connect_data(type,level):
    with open('del_connect_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}

def get_send_notice_data(type,level):
    with open('send_notice_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}

def get_del_notice_data(type,level):
    with open('del_notice_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}
def get_add_rule_data(type,level):
    with open('add_rule_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas[type][level]['ids']
    data = datas[type][level]['datas']
    return {"data": data, "ids": ids}
def get_log_data():
    with open('log_data.yaml', 'r', encoding='utf-8') as f:
        datas = yaml.safe_load(f)
    ids = datas['ids']
    data = datas['datas']
    return {"data": data, "ids": ids}